/*
  文件介绍：
    典型页面样式文件，一般以g开头的样式都为全局样式
*/
$box-shadow: 0 0 18px rgba(12, 4, 8, 0.1);
$border-bottom-color: #ccd1d8;
// 【通用类】
.g-title-con {
  background-color: #f2f2f2;
  margin-bottom: 8px;
  padding-bottom: 10px;
  padding-left: 20px;
  padding-right: 10px;
  margin-left: -20px;
  margin-right: -10px;
}
.ant-affix {
  .g-title-con {
    padding-top: 8px;
  }
}
// banner下面的标题
h2.g-main-title {
  font-weight: normal;
  font-size: 18px;
}
// banner下面标题的按钮
.g-title-button {
  .el-button {
    height: 28px;
    padding: 7px 15px !important;
  }
}
// 通用带阴影盒子
.g-box {
  box-shadow: $box-shadow;
  border-radius: 5px;
  padding: 15px;
  box-sizing: border-box;
  margin-bottom: 15px;
  background-color: #fff;
}
// 通用卡片
.g-card {
  box-shadow: $box-shadow;
  border-radius: 5px;
  padding: 25px;
  box-sizing: border-box;
  margin-bottom: 15px;
  background-color: white;
  border: 1px solid transparent;
  transition: 0.3s ease;
  &:hover {
    box-shadow: 0 4px 18px rgba(90, 183, 237, 0.5);
    border: 1px solid #66bbee;
    transition: 0.3s ease;
    z-index: 1;
    position: relative;
  }
  &.card-background {
    background-repeat: no-repeat;
    background-position: 104% -6%;
    background-size: 20%;
  }
  &.bg-1 {
    background-image: url('~@/assets/img/bg-card-1.png');
  }
  &.bg-2 {
    background-image: url('~@/assets/img/bg-card-2.png');
  }
  &.config-card {
    font-size: 13px;
    line-height: 20px;
    h3 {
      font-size: 16px;
      margin-bottom: 16px;
    }
    p {
      color: #666666;
      margin-bottom: 10px;
      height: 80px;
      width: 80%;
      text-align: justify;
      overflow: hidden;
    }
    .card-item {
      color: black;
      display: inline-block;
      width: 50%;
      line-height: 34px;
      span {
        color: #666666;
      }
    }
    .label-con {
      margin-top: 20px;
       .el-tag {
        margin-right: 10px;
      }
    }
  }
}
// 滚动列表项
.g-list-item {
  border-bottom: 1px solid #e7e7e7;
  padding: 20px 5px;
  &:first-child {
    padding-top: 0px;
  }
  &:last-child {
    border-bottom: none;
  }
  .list-item-img, .list-item-content {
    float: left;
  }
  .list-item-img {
    width: 80px;
    margin-right: 30px;
    margin-top: 10px;
    img { 
      width: 100%;
    }
  }
  .list-item-content {
    width: calc(100% - 120px);
    h3 {
      font-weight: bolder;
      margin-bottom: 15px;
      margin-top: 6px;
    }
    .list-item-detail, .list-item-rate, .list-item-operation {
      float: left;
    }
    .list-item-detail {
      width: calc(100% - 400px);
      .list-text-item {
        display: inline-block;
        margin-right: 20px;
        font-size: 12px;
        span {
          color: #666666;
        }
      }
    }
    .list-item-rate {
      text-align: center;
      width: 300px;
      font-size: 12px;
      color: #666666;
       .el-rate {
        display: inline-block;
        .el-rate__icon {
          margin: 0;
        }
      }
    }
    .list-item-operation {
      width: 100px;
    }
  }
}
// 不兼容IE9
.g-list-item-2 {
  border-bottom: 1px solid #e7e7e7;
  padding: 20px;
  display: flex;
  align-items: center;
  &:first-child {
    padding-top: 10px;
  }
  &:last-child {
    border-bottom: none;
  }
  .list-item-img {
    flex-basis: 80px;
    margin-right: 30px;
    align-self: flex-start;
    img {
      width: 80px;
    }
  }
  .list-item-content {
    flex-basis: 90%;
    h3 {
      font-weight: bolder;
      margin-bottom: 10px;
      font-size: 18px;
    }
    .list-text-item {
      display: inline-block;
      margin-right: 20px;
      font-size: 14px;
      span {
        color: #666666;
      }
    }
  }
  .list-item-operation {
    flex-basis: 210px;
    text-align: center;
  }
}
// 导航栏粘合(不兼容IE)
.g-sticky {
  position: sticky;
  top: 0;
  z-index: 1;
}

// 【表单类】
// el-form
.g-form {
  width: 60%;
  margin: auto;
}
.g-form-large {
  width: 80%;
  margin: auto;
}
// 精简查询
.g-search-simple {
  margin-bottom: 10px;
  .search-option {
    display: inline-block;
  }
}
// 输入框
.g-search-input, .g-input-width {
  width: 300px;
}
.g-input-width-large {
  width: 400px;
}
// 导航页面input
.g-input-block {
  width: 100%;
}
// input-prepend
.g-input-prepend {
  .el-input-group__prepend {
    width: 100px;
  }
}
// 查询模式
.g-query-mode {
  margin-left: 10px;
  display: inline-block;
}
// 滚动表单
.g-form-block {
  border-bottom: 1px dashed $border-bottom-color;
  margin: 25px 10px;
  padding-bottom: 10px;
  &:first-child {
    margin-top: 10px;
  }
  &:last-child {
    margin-bottom: 10px;
    border-bottom: none;
  }
  .el-form-item__label {
    font-size: 13px;
  }
  .g-form-des {
    color: #a5a5a5;
    font-size: 12px;
    line-height: 20px;
  }
}
// 分两栏
.g-form-block-grid {
  display: inline-block;
  width: 44%;
  margin: 0 3%;
  vertical-align: top;
}
// 表单标题
.g-form-title {
  border-left: 3px solid #2f8cee;
  padding-left: 10px;
  font-size: 18px;
  margin-bottom: 20px;
  color: black;
}
// 详情表单项
table.g-form-detail-item {
  width: 100%;
  border-collapse: collapse;
  border-color: transparent;
  margin-bottom: 20px;
  tr {
    border-bottom: 1px solid #e5e5e5;
  }
  &.no-border {
    tr{ 
      border-bottom: 1px solid transparent;
    }
  }
  td {
    padding-top: 20px;
    padding-bottom: 10px;
    vertical-align: top;
    word-break: break-all;
    line-height: 1.5em;
    border: none;
  }
  td:nth-child(2n+1) {
    color: #999999;
    text-align: right;
    min-width: 100px;
    &::after {
      content: "：";
    }
  }
  td:nth-child(2n) {
    padding-left: 10px;
  }
}
// 树
.g-tree-title {
  margin-bottom: 10px;
  h3 {
    font-weight: normal;
    float: left;
  }
  i {
    float: right;
    cursor: pointer;
    margin-top: 5px;
  }
}
// 绿色的checkbox
.g-checkbox {
  .label.el-checkbox.is-bordered {
    margin-left: 0;
    margin-right: 5px;
    padding: 5px 50px;
    background-color: #e9ecf0;
    border-color: #e9ecf0;
     .el-checkbox__input {
      display: none;
    }
     .el-checkbox__label {
      padding: 0;
    }
    &.is-checked {
      border-color: #2fcb68;
      background-color: white;
       .el-checkbox__label {
        color: black !important;
      }
    }
  }
}
// 多tabs表单页tabs
.g-form-tabs-1 {
  $border: 1px solid#eaeaea;
  margin: {
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: 10px;
  }
  .el-tabs__active-bar, .el-tabs__nav-wrap::after {
    display: none;
  }
  .el-tabs__item {
    background-color: #fff;
    box-sizing: border-box;
    border: {
      top: 2px solid white;
      left: 1px solid white;
      right: 1px solid white;
      bottom: $border
    }
  }
  .is-active {
    border: {
      top: 2px solid #2d83ea;
      left: $border;
      right: $border;
      bottom: 1px solid white;
    }
  }
  .el-tabs__item.is-top:nth-child(2), .el-tabs__item.is-top:last-child {
    padding: 0 20px;
  }
  .el-tabs__nav-scroll {
    background-color: #f9f9f9;
  }
}
.g-form-tabs-2 {
  margin: {
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: 15px;
  }
  .el-tabs__header {
    margin: 0;
  }
  .el-tabs__active-bar, .el-tabs__nav-wrap::after {
    display: none;
  }
  .el-tabs__item {
    margin: 10px 15px;
    border-radius: 5px;
    height: 35px;
    line-height: 35px;
  }
  .is-active {
    background-color: #3687e1;
    color: white;
  }
  .el-tabs__item.is-top:nth-child(2), .el-tabs__item.is-top:last-child {
    padding: 0 20px;
  }
  .el-tabs__nav-scroll {
    background-color: #ebf3fc
  }
}
.g-form-tabs-3 {
  padding: 8px 20px;
  background-color: #fff;
  .el-tabs__item{
    font-size: 12px;
    border: 1px solid transparent;
    &.is-top {
      &:nth-child(2), &:last-child {
        padding: 0 20px;
      }
    }
  }
  .el-tabs__nav-wrap::after{
    display: none;
  }
  .el-tabs__active-bar{
    display: none;
  }
  .el-tabs__item.is-active{
    background-color: #eef3f8;
    border-radius: 4px;
    padding: 0 20px;
    color: #333333;
    border: 1px solid #cbd2da;
    height: 34px;
    line-height: 34px;
  }
  .el-tabs__header {
    margin: 0;
  }
}

// 【表格类】
// radio列
.g-radio-column {
  .cell .el-radio__label{
    display: none;
  }
  .cell .el-radio {
    margin-left: 0;
  }
}
// 操作列
.g-operation-column {
  .el-button--text {
    color: #636d85 !important;
  }
}
// 更多选项
.g-more-column {
  i {
    transform: rotate(90deg);
    cursor: pointer;
  }
}
// 表格详情（点击单元格查看详情）
.g-detail-button {
  i, span {
    vertical-align: middle;
  }
  i {
    margin-right: 5px;
    font-size: 26px;
  }
}

// 【优化版对话框】
.g-dialog {
  .el-dialog {
    border-top: 5px solid #238bff;
  }
  .el-dialog__header {
    @extend .el-dialog__footer;
    border-bottom: 1px solid #e4e3e3;
  }
  .el-dialog__headerbtn {
    position: unset;
    top: unset;
    right: unset;
    float: right;
  }
  .el-dialog__footer {
    background-color: #f2f5f7;
    padding: 20px;
  }
  .el-dialog__body {
    height: 55vh;
    overflow: auto;
  }
}

// 【步骤条-外部】
.g-step {
  margin: 20px 0;
  .el-step__icon.is-icon {
    width: 120px;
  }
  .el-step__icon {
    height: 65px;
  }
  .el-step.is-horizontal .el-step__line {
    top: 32px;
  }
  .el-step__icon-inner[class*=el-icon]:not(.is-status) {
    font-size: 80px;
  }
  .el-step__title {
    font-size: 18px;
  }
  .el-step__head.is-process, .el-step__title.is-process, .el-step__description.is-process {
    color: #449afa;
    border-color: #449afa;
  }
  .el-step__head.is-finish {
    color: #449afa;
    border-color: #449afa;
  }
  .el-step__title.is-finish, .el-step__description.is-finish {
    color: #666666;
  }
}
// 【步骤条-对话框内部】
.g-dialog-step {
  height: 66px;
  margin: {
    top: -30px;
    left: -20px;
    right: -20px;
    bottom: 20px;
  }
  padding: 0 8%;
  .el-step__arrow {
    display: none;
  }
  .el-step.is-simple .el-step__icon-inner[class*=el-icon]:not(.is-status) {
    font-size: 44px;
  }
  .el-step.is-simple .el-step__icon {
    height: 50px;
    width: 65px;
  }
  .is-now {
    background-color: #fff;
  }
  .el-step {
    padding: 5px;
  }
  .el-step.is-simple .el-step__title {
    font-size: 14px;
  }
  .el-step.is-simple:not(:last-of-type) .el-step__title {
    max-width: 85%;
  }
  .el-step.is-simple .el-step__arrow {
    display: none;
  }
  .el-step__head.is-process {
    color: #449afa;
    border-color: #449afa;
  }
  .el-step__title.is-process {
    color: #449afa;
  }
  .el-step__head.is-finish {
    color: #449afa;
    border-color: #449afa;
  }
  .el-step__title.is-finish {
    color: black;
  }
}
// 【步骤条下面的分步表单】
.g-step-form-con {
  padding: 0 10%;
  height: calc(55vh - 130px);
  overflow: auto;
  .g-input-width {
    width: 100%;
  }
}

// 【label】
.g-label-primary {
  &.el-tag {
    background-color: #3687e1;
    border-color: #3687e1;
    border-radius: 2px;
    color: white;
    .el-tag__close {
      color: white;
    }
  }
  &.el-tag--small {
    height: 30px;
    line-height: 28px;
  }
}

// 【弹出框-高级查询】
.g-poper-form {
  .el-form {
    width: 800px;
  }
  .button-group {
    margin-top: 10px;
    margin-left: calc(100px + 3%);
  }
}

// 消费者名称
.consumer-name {
  img,  .el-button {
    vertical-align: middle;
  }
   .el-button {
    margin-left: 10px;
  }
}

// 点的颜色
.dot {
  border-radius: 50%;
  width: 8px;
  height: 8px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  &.dot-green {
    background-color: #00cb99;
    box-shadow: 0 0 10px #00cb99;
  }
  &.dot-orange {
    background-color: #ffac00;
    box-shadow: 0 0 10px #ffac00;
  }
  &+span {
    vertical-align: middle;
  }
}

// 左树右表格页面
.g-treetable-page {
  .tree-con {
    width: 20%;
    float: left;
  }
  .table-con {
    width: 78%;
    margin-left: 2%;
    float: left;
    overflow-y: auto;
    min-height: 50vh;
    .operation {
      margin-bottom: 10px;
    }
  }
}

// 左树右表单页面
.g-treeform-page {
  .tree-con, .table-con {
    height: 80vh;
  }
  .tree-con {
    width: 20%;
    float: left;
  }
  .table-con {
    width: 78%;
    margin-left: 2%;
    float: left;
    overflow-y: auto;
    .operation {
      margin-bottom: 10px;
    }
  }
}

// 导航表单页面
.g-anchor-page {
  .form-con, .anchor-con {
    float: left;
  }
  .form-con {
    width: 80%;
  }
  .anchor-con {
    width: 18%;
    margin-left: 2%;
    margin-top: 20px;
  }
}

// 分步表单页面
.g-step-form-page {
  .step-con, .preview-con {
    float: left;
    box-sizing: border-box;
    padding: 25px;
  }
  .step-con {
    width: 75%;
    border-right: 1px solid #dddddd;
  }
  .g-input-width {
    width: 80%;
  }
  .preview-con {
    width: 25%;
    table {
      font-size: 13px;
      color: #666666;
      td {
        vertical-align: top;
        height: 25px;
        word-break: break-all
      }
      td:nth-child(2n+1) {
        width: 80px;
        text-align: right;
      }
      td:nth-child(2n+1):after {
        content: "：";
      }
    }
  }
  .step-item {
    width: 65%;
    margin: auto;
  }
}

// 选项查询
.g-search-advance {
  width: 100%;
  border-color: transparent;
  border-collapse: collapse;
  color: #585858;
  font-size: 13px;
  tr {
    border-top: 1px solid #eaeaea;
    height: 51px;
  }
  td {
    padding: 10px 0;
    height: 51px;
  }
  .el-tag {
    margin-right: 10px;
  }
  .el-checkbox {
    height: 28px;
    margin-right: 0;
    margin-bottom: 10px;
     .el-checkbox__input {
      display: none;
    }
     .el-checkbox__label {
      padding: 0;
    }
  }
  .el-checkbox.is-bordered.el-checkbox--small {
    padding: 3px 10px;
  }
   .el-radio {
    margin-right: 0;
  }
   .el-radio__input {
    display: none;
  }
   .el-radio--small.is-bordered {
    height: 30px;
  }
   .el-radio__label {
    padding-left: 5px;
  }
}
// iframe
.g-iframe-con {
  height: 100%;
  .iframe-wrapper {
    height: calc(100% - 30px);
    iframe {
      width: 100%;
      height: 100%;
    }
  }
}
// 不确定表单
.g-unsure-form-page {
  .el-form-item--small.el-form-item:last-child {
    margin-bottom: 24px;
  }
}
.main-iframe {
  height: 100%;
  iframe {
    width: 100%;
    height: 100%;
  }
}
@media (max-width: 1600px) {
  .g-dialog-step {
    .el-step.is-simple .el-step__title {
      font-size: 12px;
    }
  }
  .g-step-form-page {
    .step-item {
      width: 75%;
    }
  }
}
@media (max-width: 1400px) {
  .g-box {
    margin-bottom: 10px;
  }
  .g-form-block-grid {
    display: inline-block;
    width: 48%;
    margin: 0 1%;
    vertical-align: top;
  }
  .g-dialog-step {
    .el-step.is-simple .el-step__title {
      font-size: 10px;
    }
  }
  .g-title-con {
    padding-bottom: 10px;
  }
  .g-poper-form {
    .el-form {
      width: 600px;
    }
    .button-group {
      margin-left: calc(100px + 1%);
    }
  }
  .g-step-form-page {
    .step-item {
      width: 95%;
    }
  }
  .g-list-item-2 {
    padding: 15px 5px;
    &:first-child {
      padding-top: 0;
    }
    .list-item-img {
      flex-basis: 55px;
      margin-right: 20px;
      align-self: flex-start;
      img {
        width: 55px;
      }
    }
    .list-item-content {
      flex-basis: 90%;
      h3 {
        margin-bottom: 6px;
        font-size: 15px;
      }
      .list-text-item {
        margin-right: 10px;
        font-size: 12px;
      }
    }
  }
}
.g-multi-query {
  width: 80%;
  .el-form-item {
    display: inline-block;
    width: 50%;
  }
}
.g-line {
  border-bottom: 1px dashed #ccd1d8;
  margin-bottom: 20px;
}